<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ng-selected 默认被选中</title>
    <script src="../angular.js"></script>
</head>
<body>
    <div ng-app="gg" ng-controller="ctrl">
        性别：
        <select ng-model="sex">
            <option value="">--select--</option>
            <option ng-value="1" ng-selected="user.sex == 1">男</option>
            <option ng-value="2" ng-selected="user.sex == 2">女</option>
        </select>
        {{user.sex}}
        男：<input type="radio" ng-model="user.sex" ng-value="1">
        女：<input type="radio" ng-model="user.sex" ng-value="2">
    </div>
    
<script>
    var mod=angular.module('gg', []);
    mod.controller('ctrl', ['$scope', function ($scope) {
        $scope.user = {sex:2}
    }])
</script>
</body>
</html>